
const detectScroll = (that:any)=>{
  window.addEventListener('scroll',()=>{
    const conputeDistance = ()=>{
      return document.body.clientHeight - window.scrollY - window.screen.height
    }
    const T = 100;
    // console.log(this);
    if(conputeDistance() < T){
      that.onReachBootom()
    }
  })
}
export const scrollFy = (target: any) => {
  // 此处可以代理生命周期，像created，mounted
  if(target.prototype.onReachBootom)(
    detectScroll(target.prototype)
  )
}
